//日期格式化(xxxx-xx-xx xx:xx:xx)
export function formatDate(date) {
    let startTime = new Date(date);
    let year = startTime.getFullYear();
    let month = String(startTime.getMonth() + 1).padStart(2, '0');
    let day = String(startTime.getDate()).padStart(2, '0');
    let hours = String(startTime.getHours()).padStart(2, '0');
    let minutes = String(startTime.getMinutes()).padStart(2, '0');
    let seconds = String(startTime.getSeconds()).padStart(2, '0');
    let formattedTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    return formattedTime;
}
